<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加模板</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/resource/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/resource/css/mylay.css">
</head>
<body>
    <div style="padding: 20px; background-color: #F2F2F2;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <form class="layui-form" action="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">模板名</label>
                                <div class="layui-input-block">
                                    <input type="text" name="name" autocomplete="off" placeholder="请输入模板名" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">任务分类</label>
                                <div class="layui-input-inline">
                                    <select name="task_class" lay-verify="required" lay-search="">
                                        {foreach $taskClass as $key=>$value }
                                        <option value="{$value.id}">{$value.lang}-{$value.group_name}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">任务标题</label>
                                <div class="layui-input-block">
                                    <input type="text" name="title" autocomplete="off" placeholder="请输入任务标题" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">任务简介</label>
                                <div class="layui-input-block">
                                    <textarea name="content" placeholder="请输入任务简介" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">悬赏单价</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="reward_price" value="10" autocomplete="off" placeholder="请输入悬赏单价" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">领取数量</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="total_number" value="1" autocomplete="off" placeholder="请输入领取数量" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">领取次数</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="person_time" value="1" autocomplete="off" placeholder="请输入领取次数" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">次/人</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">任务总价</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="total_price" value="10" autocomplete="off" placeholder="请输入任务总价" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">链接信息</label>
                                <div class="layui-input-block">
                                    <input type="text" name="link_info" value="" autocomplete="off" placeholder="请输入链接信息" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">任务级别</label>
                                <div class="layui-input-block">
                                    {foreach $userLevel as $key=>$value}
                                    <input type="radio" name="task_level" value="{$value.grade}" title="{$value.name}"{if reset($userLevel) eq $value} checked{/if}>
                                    {/foreach}
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">截止日期</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="end_time" autocomplete="off" placeholder="请选择截止日期" class="layui-input" readonly>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">完成条件</label>
                                <div class="layui-input-block">
                                    <input type="checkbox" name="finish_condition[0]" title="手机认证">
                                    <input type="checkbox" name="finish_condition[1]" title="微信认证">
                                    <input type="checkbox" name="finish_condition[2]" title="实名认证">
                                    <input type="checkbox" name="finish_condition[3]" title="身份认证">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">上传要求</label>
                                <div class="layui-input-block">
                                    <textarea name="requirement" placeholder="请输入上传要求" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">审核样例</label>
                                <div class="layui-upload layui-input-block">
                                    <button type="button" class="layui-btn layui-btn-normal examine_demo">选择多文件</button>
                                    <div class="layui-form-mid layui-word-aux" style="float: right;">此项如不修改请不要上传文件，否则将覆盖原数据</div>
                                    <div class="layui-upload-list">
                                        <table class="layui-table">
                                        <thead>
                                            <tr>
                                                <th>图片预览</th>
                                                <th>状态</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody id="demoList"></tbody>
                                        </table>
                                    </div>
                                    <button type="button" class="layui-btn" id="examine-demo-btn">开始上传</button>
                                </div>
                            </div>
                            <div class="layui-form-item step-holder" data-len="1">
                                <label class="layui-form-label">任务步骤</label>
                                <div class="layui-input-block" style="border: 1px solid #d2d2d2;border-radius: 3px;padding: 12px;display: flex;margin-bottom: 10px;align-items: flex-start;">
                                    <h4 style="background-color: #FFB800;width: 40px;height: 40px;border-radius: 20px;line-height: 40px;font-size: 16px;margin-right: 10px;text-align: center;margin-top: 50px;">1</h4>
                                    <div class="layui-upload-drag task-step" id="task-step-1" style="width: 10%;margin-right: 10px;">
                                        <i class="layui-icon layui-icon-upload"></i>
                                        <p>点击上传，或将文件拖拽到此处</p>
                                        <div class="layui-hide">
                                            <hr>
                                            <img src="" alt="上传成功后渲染" style="max-width: 100%">
                                            <p></p>
                                        </div>
                                    </div>
                                    <input type="hidden" name="task_step[0][img]" value="" class="layui-input">
                                    <textarea name="task_step[0][describe]" placeholder="请输入步骤描述" class="layui-textarea" style="width: 70%;display: inline-block;height: 250px;"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label"></label>
                                <div class="layui-input-block">
                                    <button type="button" class="layui-btn layui-btn-sm layui-btn-warm step-holder-add">
                                        <i class="layui-icon layui-icon-addition" style="font-size: 20px;"></i>
                                    </button>
                                    <button type="button" class="layui-btn layui-btn-sm layui-btn-warm step-holder-del">
                                        <i class="layui-icon layui-icon-subtraction" style="font-size: 20px;"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="layui-form-item" style="margin-top: 40px;text-align: center;">
                                <button class="layui-btn" lay-submit lay-filter="project_sub" data-type="taskModelAdd">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="/resource/layuiadmin/layui/layui.js"></script>
<script src="/resource/js/manage/init_date.js"></script>
<script src="/resource/js/manage/bet.js"></script>
</body>
</html>